package Exer03_分支;

import java.util.Scanner;

public class _1_3_11_逆序输出数字 {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入一个整数");
            int num = scanner.nextInt();
            int myriad,thousand,hundred,ten,individual;
            if (num >= 10000 && num <= 99999 ){
                myriad = (num%100000)/10000;
                thousand = (num%10000)/1000;
                hundred = (num%1000)/100;
                ten = (num%100)/10;
                individual = num%10;
                System.out.println(individual +""+ten +""+hundred +""+thousand +""+myriad);
            } else if (num >= 1000 && num <= 9999) {
                thousand = (num%10000)/1000;
                hundred = (num%1000)/100;
                ten = (num%100)/10;
                individual = num%10;
                System.out.println(individual +""+ten +""+hundred +""+thousand);
            }else if (num >= 100 && num <= 999) {
                hundred = (num%1000)/100;
                ten = (num%100)/10;
                individual = num%10;
                System.out.println(individual +""+ten +""+hundred);
            }else if (num >= 10 && num <= 99) {
                ten = (num%100)/10;
                individual = num%10;
                System.out.println(individual +""+ten);
            }else {
                System.out.println("请输出大于2位数");
            }
            scanner.close();
        }
}
